//
//  TGBaseVC.h
//  TongGuanLease
//
//  Created by 张奇 on 2022/4/11.
//

#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, ZLNavigationBarStyle) {
    ///默认是ZLNavigationBarStyleLightGray
    ZLNavigationBarStyleOrigin,
    ZLNavigationBarStyleBlue,
    ZLNavigationBarStyleWhite,
    ZLNavigationBarStyleLightGray,
    ///透明
    ZLNavigationBarStyleTransparency
};

//NS_ASSUME_NONNULL_BEGIN

#define NAVBAR_CHANGE_POINT RatioHeight(30)

@interface TGBaseVC : QMUICommonViewController
/** 是否禁用手势返回 YES禁用 默认NO*/
@property (nonatomic)BOOL disableRightSwipe;
@property (nonatomic,copy)void(^complentBlock)(void);
@property (nonatomic)BOOL isPresent;
@property (nonatomic, strong) NSURLSessionDataTask *baseDataTask;
@property (nonatomic, strong) NSMutableArray *sessionDataTaskMArr;
@property (nonatomic) UIStatusBarStyle statusBarStyle;

/// 返回指定的控制器
@property (nonatomic, copy) NSString *popVCName;

///白色模式并带黑色的返回那妞
- (void)setNavStyleWhiteAndBackBtn;
///白色模式
- (void)setNavStyleWhite;
///蓝色导航
- (void)setNavStyleBlue;
///导航红色模式
- (void)setNavStyleRed;
- (void)setNavStyleRedAndBackBtn;

///米白色模式RGB 248 248 248 带黑色返回按钮
- (void)setNavStyleLightGrayAndBackBtn;
- (void)setNavStyleLightGray;

- (void)setLeftButtonWhiteAction:(SEL)selct;
- (void)setLeftButtonBlackAction:(SEL)selct;

- (void)setLeftBarButtonTitle:(NSString *)title selector:(SEL)sel;
- (void)setLeftBarButtonImage:(NSString *)image selector:(SEL)sel;
- (void)setLeftQMNavBarButtonImage:(NSString *)image selector:(SEL)sel;
// 设置左边文字 haveBack 标识是否有返回
- (void)setLeftBarButtonTitle:(NSString *)title selector:(SEL)sel haveBack:(BOOL)haveBack;
// 设置左边文字 返回图片是黑色的 haveBack 标识是否有返回
- (void)setLeftWhiteBackBarButtonTitle:(NSString *)title selector:(SEL)sel haveBack:(BOOL)haveBack;

- (void)setRightBarButtonTitle:(NSString *)title selector:(SEL)sel;
- (void)setRightBarButtonImage:(NSString *)image selector:(SEL)sel;
- (void)setRightQMNavBarButtonImage:(NSString *)image selector:(SEL)sel;


- (void)pushViewController:(id)vc complent:(void (^)(void))completion;
- (void)popToViewController:(NSString *)className;
- (void)popToViewController:(NSString *)className  animated:(BOOL)animated;


- (void)addSessionDataTask:(NSURLSessionDataTask *)task;
- (void)removeSessionDataTask:(NSURLSessionDataTask *)task;
- (void)cancelTask;


///首页左边位置按钮
-(void)setLeftWithTarget:(id)target action:(SEL)action leftImageString:(NSString *)str title:(NSString *)title image:(UIImage *)image maxWith:(CGFloat)maxWith;
-(void)setLeftWithTarget:(id)target action:(SEL)action rightImageString:(NSString *)str title:(NSString *)title image:(UIImage *)image maxWith:(CGFloat)maxWith;
-(void )setLeftWithTarget:(id)target action:(SEL)action rightImageString:(NSString *)str title:(NSString *)title titleColor:(UIColor *)titleColor image:(UIImage *)image maxWith:(CGFloat)maxWith;


@end

//NS_ASSUME_NONNULL_END
